<template>
	<view class="container flex_C">
		<FeNavbar title="" :isBorder="false" />
		<scroll-view class="flex_1" scroll-y="true">
			<view class="content_wrap">
				<view class="title">{{details.title}}</view>
				<view class="time">{{details.time}}</view>
				<view class="content">
					{{details.content}}
				</view>
			</view>
		</scroll-view>
	</view>
</template>

<script>
	import {
		detailsApi
	} from '@/api/message.js'
	export default {
		data() {
			return {
				type: '',
				id: '',
				details: {}
			}
		},
		onLoad(o) {
			console.log(o, '参数')
			this.type = o.type;
			this.id = o.id;
			this.getDetails()
		},
		methods: {
			async getDetails() {
				const res = await detailsApi(this.type, this.id)
				uni.hideLoading()
				if (res.code == 200) {
					this.details = {
						...res.data,
						time: this.momentFormat(res.data.create_time)
					}
				}
			}
		}
	}
</script>

<style scoped lang="scss">
	.container {
		height: 100vh;

		&>.flex_1 {
			height: 0;
		}

		.content_wrap {
			padding: 32rpx;

			.title {
				font-weight: 600;
				font-size: 50rpx;
				color: #26282B;
			}

			.time {
				font-weight: 400;
				font-size: 24rpx;
				color: #A6ACB4;
				margin-top: 8rpx;
			}

			.content {
				font-weight: 500;
				font-size: 32rpx;
				color: #26282B;
				margin-top: 32rpx;
			}
		}
	}
</style>